import request from '../utils/request.js'

export const huoQuRoles = () => {
  return request.get('/roles')
}

export const huoShuQuRoles = () => {
  return request.get('/rights/tree')
}
export const shanChuQuRoles = (data) => {
  return request.delete(`/roles/${data.roleId}/rights/${data.perId}`)
}
//角色分配-权限点
export const fenPeiQuRoles = (id, data) => {
  return request.post('/roles/' + id + '/rights', data)
}